package main

import (
	"github.com/gin-gonic/gin"
	"go-im-server-demo/src/router"
	"log"
	"net"
)

var client *gin.Engine

func init() {
	client = gin.Default()
	router.HandleRoutes(client)
}
func main() {
	listen, err := net.Listen("tcp", ":10086")
	if err != nil {
		log.Println("创建tcp连接失败")
		return
	}

	err = client.RunListener(listen)
	if err != nil {
		log.Println("创建Gin服务失败")
	}
	log.Println("启动成功")
}
